<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>贪吃蛇游戏</title>
    <style>
        body {
            display: flex;
            flex-direction: column;
            align-items: center;
            background-color: #f0f0f0;
            font-family: Arial, sans-serif;
        }
        #game-container {
            margin-top: 20px;
        }
        #game-canvas {
            border: 2px solid #333;
            background-color: #fff;
        }
        #score-container {
            margin-top: 10px;
            font-size: 24px;
        }
        #controls {
            margin-top: 20px;
            text-align: center;
        }
        #start-btn {
            padding: 10px 20px;
            font-size: 18px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        #start-btn:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <div id="game-container">
        <canvas id="game-canvas" width="400" height="400"></canvas>
        <div id="score-container">分数: <span id="score">0</span></div>
        <div id="controls">
            <button id="start-btn">开始游戏</button>
            <p>使用方向键或WASD控制蛇的移动</p>
        </div>
    </div>
    <script src="game.js"></script>
</body>
</html>